package com.cw.maintenance.action;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;
import javax.swing.Icon;

import com.cw.maintenance.AddDataDialog;

public class CancelAction extends AbstractAction {
	AddDataDialog insertDia;

	public CancelAction() {
		super();
	}

	public CancelAction(String name) {
		super(name);
	}

	public CancelAction(String name, Icon icon, AddDataDialog insertDia) {
		super(name, icon);
		this.insertDia = insertDia;
	}

	/**
	 * Invoked when an action occurs.
	 * 
	 * @param e
	 *            ActionEvent
	 * @todo Implement this java.awt.event.ActionListener method
	 */
	public void actionPerformed(ActionEvent e) {
		insertDia.dispose();
	}
}
